import request from '@/utils/request.js'

// 获取当前管理者营业额详情
export function getTodayTurnover(date="") {
	return request({
		url: '/babyCarMerchant/order/todayIncome?date='+date,
		method: 'GET'
	})
}
// 根据订单号查询订单
export function getOrderById(order_id){
	return request({
		url:"/babyCarMerchant/order/find?order_id="+order_id,
		method:"GET"
	})
}

// 获取所有订单
export function getOrderList(param){
	console.log(param)
	return request({
		url:"/babyCarMerchant/order/list",
		method:"GET",
		data:param
	})
}

// 获取当前日营业额+订单数
export function getDay(date){
	return request({
		url:"/babyCarMerchant/order/day?date="+date,
		method:"GET"
	})
}

// 获取当前周营业额+订单数
export function getWeek(date){
	return request({
		url:"/babyCarMerchant/order/week?date="+date,
		method:"GET"
	})
}

// 获取当前月营业额+订单数
export function getMonth(date){
	return request({
		url:"/babyCarMerchant/order/month?date="+date,
		method:"GET"
	})
}

// 获取场地营业额+订单数
export function getStation(keyword){
	return request({
		url:"/babyCarMerchant/order/station?keyword="+keyword,
		method:"GET"
	})
}

// 导出数据
export function exportOrders(){
	return request({
		url:"/babyCarMerchant/order/export",
		method:"GET"
	})
}

// 订单结算
export function endOrderApi(param){
	console.log(param)
	return request({
		url:"/babyCarMerchant/order/endOrder",
		method:"POST",
		data:param
	})
}

